-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: listen on all interfaces for ecs-server #1199
base: master
Are you sure you want to change the base?
fix: listen on all interfaces for ecs-server #1199
Conversation
What are the potential security side-effects here? Should we be listening on all interfaces? |
That's a good question and it's a bit out of my domain of expertise. It would mean that if a user does not have a proper firewall, any user knowing the ip of the user, the port of the ecs-server and the auth token, would be able to request sessions token from the user's ecs-server. Otherwise, this could be made configurable as initially proposed in the issue ? Don't you have this access denied issue on Linux ? |
No, I use macOS. Perhaps we add a |
a325d69
to
8becf0d
Compare
@mtibben, I've made the changes, I'm not really used to develop in Golang. I've successfully compile and test it locally but please tell me if things can be refactored or if I've missed something. |
@mtibben could you take a look ? |
Tried this out, however realised that the aws cli (not sure about the sdk) doesn't actually allow arbitrary hosts
So the problem seems confined to the docker scenario in the issue. Can you see if the solution described at #1198 (comment) works? |
Issue is just that This seems linked to golang/go#9334. To "fix" that and force to bind on ipv4 I have changed the network type from Now base url returns the proper value:
|
Hey there! As per my comment in the issue, on Linux, the safest value to pass to this argument would be the output of this docker network inspect bridge | jq '.[0].IPAM.Config[0].Gateway' In conjunction with adding this to your docker-compose. extra_hosts:
- host.docker.internal:host-gateway
So the full command (with this option added) would be aws-vault exec \
--ecs-server \
--listen-address $(docker network inspect bridge | jq '.[0].IPAM.Config[0].Gateway') \
my-profile -- \
docker compose up --build aws-vault-proxy |
This MR is a quick fix that should solve #1198
Currently ecs-server only listens to the loopback address making it unreachable from docker containers on Linux.